package com.ruoyi.system.config;

import com.ruoyi.system.pojo.user.User;
import com.ruoyi.system.pojo.vo.UserVO;
import org.modelmapper.ModelMapper;
import org.modelmapper.convention.MatchingStrategies;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description:
 *
 * @author JourWon
 * @date Created on 2025/5/13
 */
@Configuration
public class ModelMapperConfig {

    @Bean
    public ModelMapper modelMapper() {
        ModelMapper mapper = new ModelMapper();
        // 可选：配置严格映射模式（避免属性误匹配）
        mapper.getConfiguration()
                .setMatchingStrategy(MatchingStrategies.STRICT);
        return mapper;
    }
}
